/**
 *
 */
package com.googlecode.bip.chart;

import java.io.Serializable;

/**
 *
 * @author Claude CHOISNET
 */
public class ChartConfigImpl implements ChartConfig, Serializable
{
    private static final long serialVersionUID = 1L;
    private int     width;
    private int     height;
    private boolean encodeAlpha;
    private int     compression;

    /**
     *
     */
    public ChartConfigImpl()
    {
        this.width       = 100;
        this.height      = 100;
        this.encodeAlpha = true;
        this.compression = 5;
    }

    /**
     * @return the width
     */
    public int getWidth()
    {
        return width;
    }

    /**
     * @param width the width to set
     */
    public void setWidth( int width )
    {
        this.width = width;
    }

    /**
     * @return the height
     */
    public int getHeight()
    {
        return height;
    }

    /**
     * @param height the height to set
     */
    public void setHeight( int height )
    {
        this.height = height;
    }

    /**
     * @return the encodeAlpha
     */
    public boolean isEncodeAlpha()
    {
        return encodeAlpha;
    }
    /**
     * @param encodeAlpha the encodeAlpha to set
     */
    public void setEncodeAlpha( boolean encodeAlpha )
    {
        this.encodeAlpha = encodeAlpha;
    }

    /**
     * @return the compression
     */
    public int getCompression()
    {
        return compression;
    }

    /**
     * @param compression the compression to set
     */
    public void setCompression( int compression )
    {
        this.compression = compression;
    }
    
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString()
    {
        return "ChartConfigImpl [width=" + width + ", height=" + height
                + ", encodeAlpha=" + encodeAlpha + ", compression="
                + compression + "]";
    }
}
